package com.sanuo.pico.event;

public class Energy extends MaxMinEvent {
    int max, min, step;

    public Energy setMaxMin(int max, int min, int step) {
        this.max = max;
        this.min = min;
        this.step = step;
        return this;
    }

    @Override
    public int getMax() {
        return max;
    }

    @Override
    public int getMin() {
        return min;
    }

    @Override
    public int getStep() {
        return step;
    }

    @Override
    public boolean postValue(Integer value) {
        setValue(value);
        int i = getValue();
        return super.postValue(i / step * step);
    }
}
